<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\adminchy\validate;

use think\Validate;

class UserValidate extends Validate
{
    protected $rule =   [
        'user_name'  => 'require|unique:snake_user',
        'role_id'  => 'require',
        //'password'  => 'require|min:6',
        'real_name'  => 'require|unique:snake_user',
    ];

    protected $message  =   [
        'user_name.require' => '管理员名称不能为空',
        'user_name.unique'     => '该名称已经存在',
        'role_id.require'     => '请选择管理员角色',
        //'password.require'     => '请输入登录密码',
        //'password.min'     => '登录密码至少6位',
        'real_name.require'     => '请输入真实姓名',
    ];

}